package ca.cbc.msb.entity;

import ca.cbc.medialib.entity.Media;

import java.io.Serializable;

public class MSBMessage implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 6050476985332440808L;

	private Media media;
	private MSBNotification notification;

    public MSBMessage(){}

    public Media getMedia() {
		return media;
	}
	public void setMedia(Media media) {
		this.media = media;
	}
	public MSBNotification getNotification() {
		return notification;
	}
	public void setNotification(MSBNotification notification) {
		this.notification = notification;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder("NId:");
		if(this.getNotification() != null)
			sb.append(this.getNotification().getId());
		else
			sb.append("null");
		
		sb.append(" | MId:");
		if(this.getMedia() != null)
			sb.append(this.getMedia().getId());
		else
			sb.append("null");
		
		sb.append(" | RId:");
		if(this.getNotification() != null)
			sb.append(this.getNotification().getReleaseId());
		else
			sb.append("null");
		
		return sb.toString();
	}
}
